package customerEnter.Frame.filter;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import customerEnter.Frame.Utils.Log4j;

/**
 * 
 * 
 * 类名称：MyListener 类描述：監聽數據的動向 创建人：dy 创建时间：2016-3-15 下午5:31:39
 * 
 */
public class FrameListener implements ServletContextListener {
	/**
	 * serialVersionUID:TODO
	 * 
	 * @since Ver 1.1
	 */
	public void contextDestroyed(ServletContextEvent ContextEvent) {
		Log4j.Log4jOutInfo("程序結束");
		/**
		 * ehcache 緩存結束
		 */
		// EcacheDataTransmission.getEcacheDataTransmission().doStory();
		Log4j.Log4jOutInfo("銷毀緩存");
	}

	public void contextInitialized(ServletContextEvent ContextEvent) {
		/**
		 * ehcache 緩存開始
		 */
		// EcacheDataTransmission.getEcacheDataTransmission();
		Log4j.setLog4j(getClass());
		InitializationDataFilter.InitializationImageUrlEnum();
		InitializationDataFilter.InitializationOSS();
		InitializationDataFilter.InitializationWebAppsInfo(ContextEvent);
		InitializationDataFilter.InitializationScanning();
	}
}
